import request from '@/utils/request'

export const videoCollectionsGetService = (lastMinId) => {
  return request.get(`/video/api/me/collections${lastMinId ? `?lastMinId=${lastMinId}` : ''}`);
}

export const videoCollectionsPostService = ({name, isPublic}) => {
  return request.post('/video/api/me/collections',
    {name, isPublic}
  );
}

export const videoCollectionsPutService = (id, {name, isPublic}) => {
  return request.put(`/video/api/me/collections/${id}`,
    {name, isPublic}
  );
}

export const videoCollectionsDeleteService = (id) => {
  return request.delete(`/video/api/me/collections/${id}`);
}